<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page import="DAO.ControlDB"%>
<%@page import="Entity.Contact"%>
<%@page import="Entity.Item"%>
<%@page import="java.util.ArrayList"%>
<!DOCTYPE html>
<html>
    <head>
        <title>Add</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="styleadd.css" rel="stylesheet" type="text/css"/>
        <% 
	        ControlDB con=new ControlDB();
	        ArrayList<String> listType= con.getType();
	        ArrayList<String> listBest= con.getBest();
        %>
        
    </head>
    <body>
        <div id="header">

        </div>
        <div id="content">
            <div id="contentbody">

                <div id="top">
                    <h3>Create New Contact</h3>
                </div>
                <div id="middle">

                    <s:form action="save" method="post">
                        <div id="left">
                            <table>

                                <tr>
                                    <td>First Name<span> *</span></td>
                                    <td><input class="inputtext" type="text" name="firstname"/></td>

                                </tr>
                                 <tr>
                                    <td>Surname<span> *</span></td>
                                    <td><input class="inputtext" type="text" name="surname"/></td>

                                </tr>
                                <tr>
                                    <td>Known As</td>
                                    <td><input class="inputtext" type="text" name="knownas"/></td>     
                                </tr>
                                 <tr>
                                    <td>Office Phone</td>
                                    <td><input class="inputtext" type="text" name="officephone"/></td>
                                </tr>
                                <tr>
                                    <td>Mobile Phone</td>
                                    <td><input class="inputtext" type="text" name="mobilephone"/></td>     
                                </tr>
                                 <tr>
                                    <td>ST Home Phone</td>
                                    <td><input class="inputtext" type="text" name="sthomephone"/></td>

                                </tr>
                                <tr>
                                    <td>Email Address</td>
                                    <td><input class="inputtext" type="text" name="emailaddress"/></td>     
                                </tr>
                            </table>
                        </div>
                        <div id="right">
                            <table>
                                <tr>
                                    <td>Manager Name</td>
                                    <td><input type="text" disabled="disabled"/><a href="#">lookup</a></td>

                                </tr>
                                <tr>
                                    <td>Contact Type<span> *</span></td>
                                    <td>
                                        <select class="select" name="contacttype">
                                        <% for(String i:listType){ %>
                                            <option><%=i%></option>
                                             <% } %>  
                                        </select>
                                    </td>     
                                </tr>
                                 <tr>
                                    <td>Best Contact Method</td>
                                    <td>
                                        <select class="select" name="bestcontactmethod">
                                        <% for(String i:listBest){ %>
                                            <option><%=i%></option>
                                              <% } %> 
                                        </select>
                                    </td>     
                                </tr>
                                 <tr>
                                    <td>Job Role</td>
                                    <td><input class="inputtext" type="text" name="jobrole"/></td>

                                </tr>
                                 <tr>
                                    <td>Workbase</td>
                                    <td><input class="inputtext" type="text" name="workbase"/></td>

                                </tr>
                                 <tr>
                                    <td>Lob Title</td>
                                    <td><input class="inputtext" type="text"name="lobtitle"/></td>

                                </tr> 
                                <tr>
                                    <td>Is Active?</td>
                                    <td><input type="checkbox" name="isactive"/></td>

                                </tr>
                            </table>
                            <br>
                            <br>
                        </div>
                        <s:div id="bottom">
                        <s:submit name="save" value="Save" cssStyle="button"/>
                    <s:submit name="back" value="Back" action="back" cssStyle="button"/>
                </s:div>
                    </s:form>    
                </div>
               
            </div>
        </div>
        <div id="footer">

        </div>
    </body>
</html>
